#!/usr/bin/gnuplot

set terminal latex size 5.0, 3.0
set output "plot.tex"

set format xy "$%g$"

set title 'barrier benchmark\\\footnotesize kernel with 10000 calls averaged over 4 invocations,\\at different grid and block sizes'

set xlabel '$nb$ number of blocks'
set ylabel 'normalized kernel\\ runtime time (\us)'

#set key at 15,-10
set key top left

plot "oneloop_32.dat"  using 1:2 title "32 threads" with lp, \
     "oneloop_64.dat"  using 1:2 title "64 threads" with lp, \
     "oneloop_128.dat" using 1:2 title "128 threads" with lp, \
     "oneloop_256.dat" using 1:2 title "256 threads" with lp, \
     "oneloop_512.dat" using 1:2 title "512 threads" with lp

#pause -1
#pause mouse keypress